package com.aurora.spider.site.usatoday;

import com.geccocrawler.gecco.annotation.*;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

import java.util.List;

/**
 * Created by jackie on 18/1/15.
 */
@Gecco(matchUrl="https://coupons.usatoday.com/{searchKey}", pipelines={"consolePipeline"," usatodaySearchDealLine"})
public class UsatodaySearch implements HtmlBean {

    @Request
    private HttpRequest request;

    //macys
    @RequestParameter
    private String searchKey;
    /**
     * 名称
     */
    @Text
    @HtmlField(cssPath="#root > div.bg-white > div > div > div > div.col-span-9.sm\\:col-span-10.md\\:col-span-9.ml-4.md\\:ml-8.rtl\\:ml-0.rtl\\:mr-4.rtl\\:md\\:mr-8 > h1")
    private String h1;

    /**
     * metaDescription
     */
    @Text
    @HtmlField(cssPath="head > meta:nth-child(15)")
    private String meta_descrption;

    /**
     * metaTitle
     */
    @Text
    @HtmlField(cssPath="head > title")
    private String meta_title;

    /**
     * logoUrl
     */
    @Image()
    @HtmlField(cssPath="#root > div.bg-white > div > div > div > div.col-span-3.sm\\:col-span-2.md\\:col-span-1 > img")
    private String logo_url;


    /**
     * storeName
     */
    @Text
    @HtmlField(cssPath="#root > div.bg-gray-100 > div > div > div > ul > li.inline-block.font-bold")
    private String store_name;

    // 列表
    @HtmlField(cssPath="#root > div.container.mx-auto > div > div > div.col-span-2.px-4.md\\:px-0.lg\\:mr-6.rtl\\:lg\\:mr-0.rtl\\:lg\\:ml-6 > section:nth-child(1) > div.BrandOffers > article.Offer.relative.mb-4.bg-gray-50.sm\\:bg-white.rounded-lg.shadow.border.shadow-sm.border-2.border-partner-500")
    private List<HitProject> projectList;

    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }

    public String getSearchKey() {
        return searchKey;
    }

    public void setSearchKey(String searchKey) {
        this.searchKey = searchKey;
    }

    public String getH1() {
        return h1;
    }

    public void setH1(String h1) {
        this.h1 = h1;
    }

    public String getMeta_descrption() {
        return meta_descrption;
    }

    public void setMeta_descrption(String meta_descrption) {
        this.meta_descrption = meta_descrption;
    }

    public String getMeta_title() {
        return meta_title;
    }

    public void setMeta_title(String meta_title) {
        this.meta_title = meta_title;
    }

    public String getLogo_url() {
        return logo_url;
    }

    public void setLogo_url(String logo_url) {
        this.logo_url = logo_url;
    }

    public String getStore_name() {
        return store_name;
    }

    public void setStore_name(String store_name) {
        this.store_name = store_name;
    }

    public List<HitProject> getProjectList() {
        return projectList;
    }

    public void setProjectList(List<HitProject> projectList) {
        this.projectList = projectList;
    }
}
